<style scoped>
    .expand-row{
        margin-bottom: 16px;
        text-align: center;
    }
</style>
<template>
    <div>
        <Row class="expand-row" v-if="list.length == 0">
            <Col span="24">
                <span class="expand-key">暂无同行人</span>
            </Col>
        </Row>
<!--        <Row class="expand-row" v-for="(item,index) in list" :key="index">-->
      <Row class="expand-row" style="width: 68%">
          <Table :columns="columns" :data="list">
            <template slot-scope="{ row }" slot="quguo_high_risk">
              <span v-if="row.quguo_high_risk === '2'">途经</span>
              <span v-if="row.quguo_high_risk === '1'">未途经</span>
            </template>
          </Table>
<!--          <Card>-->
<!--            <Row>-->
<!--              <Col span="8" style="border-top:1px solid #000;border-left:1px solid #000;">-->
<!--                <span class="expand-key">同行人姓名: </span>-->
<!--                <span class="expand-value">{{ item.passenger_name }}</span>-->
<!--              </Col>-->
<!--              <Col span="8" style="border-top:1px solid #000;border-left:1px solid #000;">-->
<!--                <span class="expand-key">同行人身份证号: </span>-->
<!--                <span class="expand-value">{{ item.passenger_cardno }}</span>-->
<!--              </Col>-->
<!--              <Col span="8" style="border-top:1px solid #000;border-left:1px solid #000;border-right:1px solid #000;">-->
<!--                <span class="expand-key">同行人电话: </span>-->
<!--                <span class="expand-value">{{ item.passenger_tel }}</span>-->
<!--              </Col>-->
<!--              <Col span="8" style="border-top:1px solid #000;border-left:1px solid #000;border-bottom:1px solid #000;">-->
<!--                <span class="expand-key">核酸结果: </span>-->
<!--                <span class="expand-value">{{ item.hesuan_result }}</span>-->
<!--              </Col>-->
<!--              <Col span="8" style="border-top:1px solid #000;border-left:1px solid #000;border-bottom:1px solid #000;">-->
<!--                <span class="expand-key">核酸时间: </span>-->
<!--                <span class="expand-value">{{ item.hesuan_detail }}</span>-->
<!--              </Col>-->
<!--              <Col span="8" style="border:1px solid #000;">-->
<!--                <span class="expand-key">是否去过高风险地区: </span>-->
<!--                <span class="expand-value">-->
<!--                <span v-if="item.quguo_high_risk === '2'">途经</span>-->
<!--                <span v-if="item.quguo_high_risk === '1'">未途经</span>-->
<!--              </span>-->
<!--              </Col>-->
<!--            </Row>-->
<!--          </Card>-->
        </Row>
    </div>
</template>
<script>
export default {
  props: {
    row: Object
  },
  data () {
    return {
      list: [],
      columns: [
        { title: '同行人姓名', width: '100', key: 'passenger_name', align: 'center' },
        { title: '同行人身份证号', width: '160', key: 'passenger_cardno', align: 'center' },
        { title: '同行人电话', key: 'passenger_tel', align: 'center' },
        { title: '核酸结果', key: 'hesuan_result', align: 'center' },
        { title: '核酸时间', width: '170', key: 'hesuan_detail', align: 'center' }
        // { title: '是否去过高风险地区', width: '170', slot: 'quguo_high_risk', align: 'center' }
      ]
    }
  },
  async mounted () {
    console.log(this.row)
    if (this.row) {
      this.list = this.row.cargoTransportationPeoplePeer
    }
  }
}
</script>
